package com.rr.singleton;

//饿汉式
public class Hungry2 {

    //造成内存空间的占用
    private byte[] data=new byte[1024*1024];
    private byte[] data1=new byte[1024*1024];
    private byte[] data2=new byte[1024*1024];

    //私有的静态属性
    private final static Hungry2 HUNGRY_2=new Hungry2();

    //私有的构造方法
    private Hungry2(){

    }

    //公共的静态入口
    public static Hungry2 getHungry2(){
        return HUNGRY_2;
    }
}